package com.xxxx.seckill.service;

/**
 * @author FYM
 * @data 2022/3/21 14:30
 */

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.seckill.pojo.Order;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.vo.GoodsVo;
import com.xxxx.seckill.vo.OrderDetailVo;

/**
 * 服务类
 *
 */
public interface IOrderService extends IService<Order> {

    /**
     * 秒杀
     *
     * @param user    用户对象
     * @param goodsVo 商品对象
     **/
    Order secKill(com.xxxx.seckill.pojo.User user, GoodsVo goodsVo);

    /**
     * 订单详情方法
     *
     **/
    OrderDetailVo detail(Long orderId);

    /**
     * 获取秒杀地址
     *
     **/
    String createPath(User user, Long goodsId);

    /**
     * 校验秒杀地址
     *
     **/
    boolean checkPath(User user, Long goodsId, String path);

    /**
     * 校验验证码
     **/
    boolean checkCaptcha(User tuser, Long goodsId, String captcha);
}

